package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 团队角色实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "team_role", 
       uniqueConstraints = @UniqueConstraint(columnNames = {"tenant_id", "role_name"}))
public class TeamRole extends BaseEntity {
    
    @Column(name = "role_id", length = 32, unique = true, nullable = false)
    private String roleId;
    
    @Column(name = "tenant_id", length = 32, nullable = false)
    private String tenantId;
    
    @Column(name = "role_name", length = 64, nullable = false)
    private String roleName;
    
    @Column(name = "role_alias", length = 64)
    private String roleAlias;
    
    @Column(name = "description", length = 200)
    private String description;
    
    @Column(name = "is_active", nullable = false)
    private Boolean isActive = true;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
    
    @Override
    public String toString() {
        return this.roleName;
    }
}





